// pages/step1/step1.js
var app = getApp()
var WxParse = require('../../wxParse/wxParse.js');
Page({

  /**
   * 页面的初始数据
   */
  data: {
    show: false
  },
  onLoad() {
    this.setData({
      pname: app.globalData.pname,
      page: app.globalData.page,
      pday: app.globalData.pday,
    })

    var that = this;
    // app.getGoodData(66582, function (res) {
    //   console.log(res)
    //   var article = res.goods_content;
    //   WxParse.wxParse('article', 'html', article, that, 48);
    // })
    // app.getGoodData(66584, function (res) {
    //   console.log(res)
    //   var article = res.goods_content;
    //   WxParse.wxParse('article1', 'html', article, that, 48);
    // })
    // app.getGoodData(66585, function (res) {
    //   console.log(res)
    //   var article = res.goods_content;
    //   WxParse.wxParse('article2', 'html', article, that, 48);
    // })
    // app.getGoodData(66586, function (res) {
    //   console.log(res)
    //   var article = res.goods_content;
    //   WxParse.wxParse('article3', 'html', article, that, 48);
    // })
  },
  tonext() {
    wx.navigateTo({
      url: '../step2/step2',
    })
  },
  topic() {
    wx.navigateTo({
      url: '../pic1/pic1',
    })
  },
  onShareAppMessage: function () {
    return {
      title: app.globalData.share,
      path: 'pages/index/index',
      imageUrl: 'http://p09hxyq7u.bkt.clouddn.com/%E5%9B%BE%E5%83%8F%203.png'
    }
  },
  show:function(){
    this.setData({
      show: true
    })
  },
  close(){
    this.setData({
      show: false
    })
  }
})